package com.fengpb.friday.conductor.dao.mapper.provider;

import com.fengpb.friday.conductor.common.metadata.workflow.WorkflowDef;
import org.apache.ibatis.jdbc.SQL;

public class MetadataMapperProvider {

    public String updateWorkflowDef(WorkflowDef def, int latest_version, String json_data) {
        return new SQL(){{
            UPDATE("meta_workflow_def");
            SET("json_data = " + json_data);
            WHERE("name = " + def.getName());
            AND();
            WHERE("version = " + def.getVersion());
        }}.toString();
    }
}
